﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="testweb._Default" %>
<%@ Register Assembly="RepeaterEx" Namespace="Kangjin.Web.UI.Controls.RepeaterEx" TagPrefix="cc1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>제목 없음</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <cc1:repeaterex id="RepeaterEx1" runat="server" DataSourceID="SqlDataSource1" OnItemCommand="RepeaterEx1_ItemCommand" OnItemDataBound="RepeaterEx1_ItemDataBound" >
        <ItemTemplate>
            <%# Container.IsFirst == true ? "First" : "" %>
            <%# Container.IsLast == true ? "Last" : "" %> 
            <asp:Label ID="lbl_text" runat="server" Text='<%#Eval("SUBJECT") %>' ></asp:Label>
            <asp:Button ID="Button1" runat="server" Text="Button" CommandName="click" />
            <br />
        </ItemTemplate>
        <EmptyDataTemplate>
             비었을때 입니다.
        </EmptyDataTemplate>
        </cc1:repeaterex>
        &nbsp;
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:PrimaConnectionString1 %>"
            DeleteCommand="DELETE FROM [PRIMA_BOARD] WHERE [ID] = @ID" InsertCommand="INSERT INTO [PRIMA_BOARD] ([BOARD_CODE], [SUBJECT], [CONTENT], [SOURCE], [REG_DATE], [HIT_COUNT], [LINK_URL], [DISPLAY_YN]) VALUES (@BOARD_CODE, @SUBJECT, @CONTENT, @SOURCE, @REG_DATE, @HIT_COUNT, @LINK_URL, @DISPLAY_YN)"
            ProviderName="<%$ ConnectionStrings:PrimaConnectionString1.ProviderName %>" SelectCommand="SELECT [ID], [BOARD_CODE], [SUBJECT], [CONTENT], [SOURCE], [REG_DATE], [HIT_COUNT], [LINK_URL], [DISPLAY_YN] FROM [PRIMA_BOARD]"
            UpdateCommand="UPDATE [PRIMA_BOARD] SET [BOARD_CODE] = @BOARD_CODE, [SUBJECT] = @SUBJECT, [CONTENT] = @CONTENT, [SOURCE] = @SOURCE, [REG_DATE] = @REG_DATE, [HIT_COUNT] = @HIT_COUNT, [LINK_URL] = @LINK_URL, [DISPLAY_YN] = @DISPLAY_YN WHERE [ID] = @ID">
            <InsertParameters>
                <asp:Parameter Name="BOARD_CODE" Type="Int32" />
                <asp:Parameter Name="SUBJECT" Type="String" />
                <asp:Parameter Name="CONTENT" Type="String" />
                <asp:Parameter Name="SOURCE" Type="String" />
                <asp:Parameter Name="REG_DATE" Type="DateTime" />
                <asp:Parameter Name="HIT_COUNT" Type="Int32" />
                <asp:Parameter Name="LINK_URL" Type="String" />
                <asp:Parameter Name="DISPLAY_YN" Type="String" />
            </InsertParameters>
            <UpdateParameters>
                <asp:Parameter Name="BOARD_CODE" Type="Int32" />
                <asp:Parameter Name="SUBJECT" Type="String" />
                <asp:Parameter Name="CONTENT" Type="String" />
                <asp:Parameter Name="SOURCE" Type="String" />
                <asp:Parameter Name="REG_DATE" Type="DateTime" />
                <asp:Parameter Name="HIT_COUNT" Type="Int32" />
                <asp:Parameter Name="LINK_URL" Type="String" />
                <asp:Parameter Name="DISPLAY_YN" Type="String" />
                <asp:Parameter Name="ID" Type="Int32" />
            </UpdateParameters>
            <DeleteParameters>
                <asp:Parameter Name="ID" Type="Int32" />
            </DeleteParameters>
        </asp:SqlDataSource>
    </div>
    </form>
</body>
</html>
